package cn.just.student_mall.mapper;

import cn.just.student_mall.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;

/**
 * @Author wujiaming
 * @Description TODO
 * @Date 2021-03-24 11:34
 * @Version 1.0
 */

//@Mapper
public interface UserMapper {

    /**
     * 添加用户
     * @param user
     * @return
     */
    public Integer addUser(User user);

    /**
     * 通过用户名查询用户
     * @param username
     * @return
     */
    public User findByUserName(String username);

    /**
     * 根据uid跟新头像
     * @param uid
     * @param avatar
     * @param modifiedUser
     * @param modifiedTime
     * @return
     */
    Integer updateAvatarByUid(@Param("uid") Integer uid,
                              @Param("avatar") String avatar,
                              @Param("modifiedUser") String modifiedUser,
                              @Param("modifiedTime") Date modifiedTime);
}
